Shadow memory should be in MiB, not KiB. It also needs rounding up to be safe.
authorEwan Mellor <ewan@xensource.com>
Wed, 30 Aug 2006 08:47:24 +0000 (09:47 +0100)
committerEwan Mellor <ewan@xensource.com>
Wed, 30 Aug 2006 08:47:24 +0000 (09:47 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomainInfo.py

index f9bf32e8c7d22a61a2e77c64ac829bc0259eaf23..fbb60c0c302015ced5e8df110d043fc0a8b383e6 100644 (file)
@@ -1301,7 +1301,8 @@ class XendDomainInfo:
             balloon.free(mem_kb + shadow_kb)
 
             # Set up the shadow memory
-            shadow_cur = xc.shadow_mem_control(self.domid, shadow_kb * 1024)
+            shadow_cur = xc.shadow_mem_control(self.domid,
+                                               (shadow_kb + 1023) / 1024)
             self.info['shadow_memory'] = shadow_cur
 
             # initial memory allocation